package test.fanxin.method;



import test.fanxin.clases.CarBean;
import test.fanxin.clases.HouseBean;
/** 
 * Author: Jiangtao He; Email: ross.jiangtao.he@gmail.com 
 * Date: 2012-1-4 
 * Since: MyJavaExpert v1.0 
 * Description:test the generic class and method 
 */  
public class MyMain  
{  
    public static void main(String[] args) throws Exception  
    {  
        // define a object for generic method test  
        GenericMethodProcess oGMP = new GenericMethodProcess();  
  
        // Car bean generic method test  
        CarBean oCarBean = new CarBean();  
        oCarBean.setBrand("Mercedes");  
        oCarBean.setName("BMW");  
        oCarBean.setPrice("888,000 RMB");  
  
        String sBeanStr = oGMP.toString(oCarBean);  
        System.out.println("CarBean toString: " + sBeanStr);  
  
        // House bean generic method test  
        HouseBean oHouseBean = new HouseBean();  
        oHouseBean.setBrand("Shanghai Wanke City");  
        oHouseBean.setName("4 rooms with 4 restrooms house");  
        oHouseBean.setPrice("6,000,000 RMB");  
  
        sBeanStr = oGMP.toString(oHouseBean);  
        System.out.println("HouseBean toString: " + sBeanStr);  
    }  
}  